Digital Logic - Mealy And Moore State Machines